package com.wlz.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wlz.mapper.TEmployeeMapper;
import com.wlz.model.TEmployee;
import com.wlz.service.ITEmployeeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wlz
 * @since 2021-03-01
 */
@Service
public class TEmployeeServiceImpl extends ServiceImpl<TEmployeeMapper, TEmployee> implements ITEmployeeService {

    @Override
    public int save(List<TEmployee> list) {
        for (TEmployee tEmployee :list) {
            this.baseMapper.insert(tEmployee);
        }
        return 0;
    }

    @Override
    public List<TEmployee> queryByScrollingPagination(Integer lastBatchMaxId, Integer limit) {
        return this.baseMapper.getList(lastBatchMaxId,limit);
    }
}
